package com.kinghunt.misp.common.dto.userx;

import com.alibaba.excel.annotation.ExcelProperty;
import com.kinghunt.misp.common.utils.easyExcel.CommonExcel;
import com.kinghunt.misp.common.utils.easyExcel.RoleConverter;
import com.kinghunt.misp.common.utils.easyExcel.SexConverter;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

/**
 * 用户批量导入EXCEL
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserImportDTO extends CommonExcel {
    /**
     * 登录名，如学号、工号
     */
    @ExcelProperty(index = 0, value = "用户名")
    @NotNull
    private String username;

    /**
     * 真实姓名
     */
    @ExcelProperty(index = 1, value = "真实姓名")
    @NotNull
    private String realname;

    /**
     * 性别
     */
    @ExcelProperty(index = 2, value = "性别", converter = SexConverter.class)
    @NotNull
    private Integer gender;

    /**
     * 角色
     */
    @ExcelProperty(index = 3, value = "角色", converter = RoleConverter.class)
    @NotNull
    private Long roleId;

    /**
     * 手机号
     */
    @ExcelProperty(index = 4, value = "手机号码")
    private String phone;

    /**
     * 邮箱
     */
    @ExcelProperty(index = 5, value = "邮箱")
    private String email;

    /**
     * 证件号码
     */
    @ExcelProperty(index = 6, value = "身份证号")
    private String certificateNo;

    /**
     * 描述
     */
    @ExcelProperty(index = 7, value = "备注")
    private String description;
}
